#include<iostream>
using namespace std;
#include<cmath>

#include"library.h"

int main(){

	int i,j,n=3;
	double B[3][4] = {{1,1,1,3},{1,2,2,5},{1,3,4,8}};
	double **A = new double * [n];
	for(i=0;i<n;i++){
		A[i] = new double [n+1];
		for(j=0;j<n+1;j++){
			A[i][j] = B[i][j];
		}
	}
	double *x = new double [n];
	GaussLinear(3,A,x,1E-4);
	cout<<"x=";
	for(int i=0;i<3;i++) cout<<x[i]<<",";
	cout<<endl;
	delete [] x;
	for(i=0;i<n;i++) delete [] A[i];
	delete [] A;
	return 0;
}
